home *** CD-ROM | disk | FTP | other *** search
/ Sky at Night 2007 June / SAN CD 6-2007 CD-ROM 25.iso / pc / Software / AstroGrav_Win / Java / jre1.6.0 / lib / rt.jar / java / util / AbstractMap$SimpleImmutableEntry.class (.txt) < prev    next >
Encoding:
Java Class File  |  2006-11-29  |  1.6 KB  |  49 lines

  1. package java.util;
  2.  
  3. import java.io.Serializable;
  4.  
  5. public class AbstractMap$SimpleImmutableEntry<K, V> implements Map.Entry<K, V>, Serializable {
  6.    private static final long serialVersionUID = 7138329143949025153L;
  7.    private final K key;
  8.    private final V value;
  9.  
  10.    public AbstractMap$SimpleImmutableEntry(K var1, V var2) {
  11.       this.key = var1;
  12.       this.value = var2;
  13.    }
  14.  
  15.    public AbstractMap$SimpleImmutableEntry(Map.Entry<? extends K, ? extends V> var1) {
  16.       this.key = (K)var1.getKey();
  17.       this.value = (V)var1.getValue();
  18.    }
  19.  
  20.    public K getKey() {
  21.       return this.key;
  22.    }
  23.  
  24.    public V getValue() {
  25.       return this.value;
  26.    }
  27.  
  28.    public V setValue(V var1) {
  29.       throw new UnsupportedOperationException();
  30.    }
  31.  
  32.    public boolean equals(Object var1) {
  33.       if (!(var1 instanceof Map.Entry)) {
  34.          return false;
  35.       } else {
  36.          Map.Entry var2 = (Map.Entry)var1;
  37.          return AbstractMap.access$000(this.key, var2.getKey()) && AbstractMap.access$000(this.value, var2.getValue());
  38.       }
  39.    }
  40.  
  41.    public int hashCode() {
  42.       return (this.key == null ? 0 : this.key.hashCode()) ^ (this.value == null ? 0 : this.value.hashCode());
  43.    }
  44.  
  45.    public String toString() {
  46.       return this.key + "=" + this.value;
  47.    }
  48. }
  49.